#!/usr/bin/env bash
c_name=zipkin

docker run -d \
--dns=192.168.2.147 \
-e STORAGE_TYPE=mysql \
-e MYSQL_DB=zipkin \
-e MYSQL_USER=root \
-e MYSQL_PASS=my-secret-ab \
-e MYSQL_HOST=mysql.dormi.io \
-e MYSQL_TCP_PORT=3306 \
-e RABBIT_URI=amqp://app_user:gmc123@rabbitqm.dormi.io:5672/zipkin \
--restart=always \
--name=$c_name \
-p 9411:9411 \
openzipkin/zipkin

docker logs -f $c_name


# `MYSQL_DB`: The database to use. Defaults to "zipkin".
# `MYSQL_USER` and `MYSQL_PASS`: MySQL authentication, which defaults to empty string.
# `MYSQL_HOST`: Defaults to localhost
# `MYSQL_TCP_PORT`: Defaults to 3306
# `MYSQL_MAX_CONNECTIONS`: Maximum concurrent connections, defaults to 10
# `MYSQL_USE_SSL`: Requires `javax.net.ssl.trustStore` and `javax.net.ssl.trustStorePassword`, defaults to false.

# RABBIT_URI=amqp://user:pass@host:10000/vhost
# RABBIT_URI=amqp://app_user:gmc123@rabbitqm.dormi.io:5672/zipkin